
package org.puremvc.as3.multicore.demos.flex.hellopipes.modules.simplemodule.model
{
	import mx.collections.ArrayCollection;
	
	import org.puremvc.as3.multicore.patterns.proxy.Proxy;

	/**
	 * MessagesProxy 
	 * Just a simple Proxy, which stores all messages sended by Shell
	 * 
	 */
	public class MessagesProxy extends Proxy
	{
        public static const NAME:String = 'MessagesProxy';

		public function MessagesProxy()
        {
            super( NAME, new ArrayCollection() );
        }
        
        public function addMessage(message: String):void
        {
        	messages.addItem(message);
        }
		
		public function get messages():ArrayCollection
		{
			return data as ArrayCollection;
		}
	}
}